package com.team7.happycommunity.businessservice.controller;

import com.team7.happycommunity.businessservice.entity.Areainfo;
import com.team7.happycommunity.businessservice.service.AreainfoService;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 小区信息表(Areainfo)表控制层
 *
 * @author makejava
 * @since 2020-03-27 14:24:46
 */
@RestController
@RequestMapping("areainfo")
@Api(tags="小区信息管理接口")
public class AreainfoController {
    /**
     * 服务对象
     */
    @Resource
    private AreainfoService areainfoService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    @ApiOperation(value = "查询小区信息")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id",value = "用户id",required = true),
    })
    public Areainfo selectOne(Integer id) {
        return this.areainfoService.queryById(id);
    }

}